package creatType.FactoryMethod;

import creatType.FactoryMethod.factory.IFactoryMethod;
import creatType.FactoryMethod.factory.impl.StudentFactoryImpl;
import creatType.FactoryMethod.factory.impl.TeacherFactoryImpl;
import creatType.FactoryMethod.work.IWork;

public class Main {

    public static void main(String[] args) {
        IFactoryMethod iFactoryMethod = new StudentFactoryImpl();
        IWork iWork = iFactoryMethod.getWork();
        iWork.doWork();

        System.out.println("--------------");

        iFactoryMethod = new TeacherFactoryImpl();
        iWork = iFactoryMethod.getWork();
        iWork.doWork();
    }

}
